﻿using System;
using System.Collections;

namespace ArrayListPractice
{
    class Program
    {
        static void Main(string[] args)
        {
            ArrayList list = new ArrayList() { "孤江隐月","月影流光","光屋左须","须佐能乎" };
            ArrayList newList = new ArrayList();

            
            foreach (var v in newList)
            {
                Console.WriteLine(v);
            }

            int index = list.IndexOf("孤寂");
            if (index != -1)
            {
                Console.WriteLine("集合中存在 其元素！");
            }
            else
            {
                Console.WriteLine("集合中不存在 其 元素！");
            }


            ArrayList insertList = new ArrayList() {"难难难"};
            list.InsertRange(0, insertList);
            foreach (var v in list)
            {
                Console.WriteLine(v);
            }


            Console.WriteLine(  );

            Console.WriteLine();
            list.Sort();
            foreach (var v in list)
            {
                Console.WriteLine(v);
            }
        }
    }
}
